// Strategy.h

#pragma once

#include <iostream>

#include "Order.h"
#include "Positions.h"
#include "MarketData.h"

using namespace std;

class Strategy
{
public:

	static const double SINGLE_TRADE_FEES;
	static const double EPS;

	virtual vector<Order*> get_order(const MarketData &md, const Positions &pos) = 0;
};

class ArbitrageStrategy : public Strategy 
{
private:

	unordered_map<string, int> _mp;

	bool _is_in_trade_time(const string &datetime);

	bool _is_overtime(const string &order_datetime, const string &cur_datetime);

public:

	static const int MIN_TRADE_VOLUME;
	static const double MIN_CLOSE_PROFIT;

	ArbitrageStrategy();

	vector<Order*> get_order(const MarketData &md, const Positions &pos);
};